package com.example.springboot01.test;

import org.springframework.beans.factory.SmartInitializingSingleton;
import org.springframework.stereotype.Component;

/**
 * TODO
 *
 * @author chenke
 * @version 1.0
 * @date 2022/7/27 10:45
 */
@Component
public class MySmartInitializingSingleton implements SmartInitializingSingleton {

    private final BeanTest beanTest;

    public MySmartInitializingSingleton(BeanTest beanTest) {
        this.beanTest = beanTest;
    }

    @Override
    public void afterSingletonsInstantiated() {
        System.out.println("spring加载完成" + beanTest);
    }
}
